package com.example.demo.service.Impl;

import com.example.demo.entity.ListingCalendar;
import com.example.demo.mapper.ListingCalendarMapper;
import com.example.demo.service.IListingCalendar;
import com.example.demo.vo.ListingCalendarVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ListingCalendarServiceImpl implements IListingCalendar {

    @Autowired
    private ListingCalendarMapper mapper;


    @Override
    public int insertListingCalendar(ListingCalendar listingCalendar) {
        return mapper.insertListingCalendar(listingCalendar);
    }

    @Override
    public boolean deleteListingCalendar(String id) {
        return mapper.deleteListingCalendar(id);
    }

    @Override
    public boolean updateListingCalendar(ListingCalendar listingCalendar) {
        int row = mapper.updateListingCalendar(listingCalendar);
        return row > 0;
    }

    @Override
    public List<ListingCalendarVo> selectListingCalendarList(Integer realPageNum, Integer pageSize) {
        return mapper.selectListingCalendarList(realPageNum, pageSize);
    }

    @Override
    public boolean selectById(String id) {
        return mapper.selectById(id);
    }
}
